<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :fullscreen.sync="fullscreen"
    :switchFullscreen="switchFullscreen"
    :okButtonProps="{style:{display:'none'}}"
    @cancel="handleCancel">

    <iframe  :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>

  </j-modal>
</template>

<script>
  import Vue from 'vue'
  import { ACCESS_TOKEN } from "@/store/mutation-types"

  export default {
    name: "CmsContentV1PageBuilderModal",
    data () {
      return {
        title:"操作",
        visible: false,
        confirmLoading: false,
        model: {},
        url: "",
        id:"",
        fullscreen: true,
        switchFullscreen: true,
      }
    },
    created () {
    },
    methods: {
      goUrl (record) {
        this.visible = true;
        this.model = Object.assign({}, record);

        let url = "/page-builder/"
        this.id = this.model.id
        //url = "http://www.baidu.com"
        console.log("------url------"+url)
        if (url !== null && url !== undefined) {
          this.url = url+'?id='+this.id;
          console.log("------this.url------"+this.url)
          //window.open(this.url);
        }
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleOk () {
        const that = this;
        that.close();
      },
      handleCancel () {
        this.close()
      },

    }
  }
</script>

<style lang="less" scoped>

</style>